package net.knightwatch.kwtools.database;

import android.database.sqlite.SQLiteDatabase;
import android.util.Log;

public class RadioButtonQuestionTable {
	private static final String TAG = "RadioButtonQuestionTable";
	public static final String TABLE_RADIOBUTTONQUESTIONS = "RadioButtonQuestions";
	public static final String COLUMN_ID = "_id";
	public static final String COLUMN_QUESTION_ID = "questionId";
	public static final String COLUMN_OPTION_ID = "optionId";
	public static final String COLUMN_OPTION_TEXT = "optionText";
	
	// Database Creation SQL Statement
	private static final String DATABASE_CREATE = "create table " 
			+ TABLE_RADIOBUTTONQUESTIONS
			+ "("
			+ COLUMN_ID + " integer primary key autoincrement,"
			+ COLUMN_QUESTION_ID + " integer not null,"
			+ COLUMN_OPTION_ID + " integer not null,"
			+ COLUMN_OPTION_TEXT + " text not null"
			+ ");";
	
	public static void onCreate(SQLiteDatabase database) {
		
		try {
			Log.i(TAG, "Creating " + TABLE_RADIOBUTTONQUESTIONS + " Table");
			Log.d(TAG, DATABASE_CREATE);
			database.execSQL(DATABASE_CREATE);
		} catch (Exception e) {
			Log.d(TAG, "Unable to create the database");
		}
	}
	
	public static void onUpgrade(SQLiteDatabase database, int oldVersion, int newVersion){
		
	}
	
}
